<?php

namespace App\Library\Traits;

trait BaseServiceTrait
{
    use BaseTrait;

    public mixed $logic;

    private static array $instanceMap = [];

    /**
     * me
     * @return static
     */
    public static function me(): static
    {
        $class = get_called_class();
        if (!isset(self::$instanceMap[$class])) self::$instanceMap[$class] = new $class();
        return self::$instanceMap[$class];
    }
}
